package com.fujica.invoicing.service.impl;

import com.fujica.invoicing.entity.TSupplier;
import com.fujica.invoicing.mapper.ISuppilerMapper;
import com.fujica.invoicing.service.ISupplierService;
import com.fujica.invoicing.utils.Result;
import com.fujica.invoicing.utils.ResultBody;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @ClassName SupplierServiceImpl
 * @Description TODO
 * @Author admin
 * @Date 2020/8/11 14:15
 * @Version 1.0
 **/
@Service
public class SupplierServiceImpl implements ISupplierService {

    @Autowired
    private ISuppilerMapper iSuppilerMapper;

    /**
     * 获取所有的供应商
     * @return
     */
    @Override
    public Result list() {

        // 获取所有的供应商
        List<TSupplier> suppliers = iSuppilerMapper.selectAll();
        // 返回给前端
        return ResultBody.ok(suppliers);
    }
}
